package org.grow.preview.domain.domainUtils;

import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.Random;
import java.util.UUID;
@Data
@Component
public class RandomUtil {

    private Random random =new Random();

    public String randomBusinessCode(){
         return   this.randomBusinessCode(10);
    }
    public String randomBusinessCode(int size){
      return   "S"+UUID.randomUUID().toString().substring(0,size);



    }


    public String nextInt(int i) {
        return String.format("%04d",random.nextInt(i));

    }


    public String  a = "select * from bill left join cargo on bill.bill_code=cargo.bill_code where cargo.cargo_code like 'Saff85%' ";

}
